home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1996 August / Software of the Month Club 1996 August.iso / pc / dos / dtp / dta / dta.doc < prev    next >
Text File  |  1996-02-23  |  38KB  |  997 lines

  1.                    DTA (Dave's .TGA Animation Program)
  2.                            Rel 2.2 (02/24/96)
  3.              Copyright (c) 1991 through 1996 by David K. Mason
  4.  
  5. ---------------------------------------------------------------------
  6.  
  7. (note: If you use DTA very often, then you should check out
  8. the file whatsnew.dta.  It usually contains some info I forgot to
  9. put in here.  It also contains more detailed descriptions of some
  10. functions, and occasionally a discussion of my reasons for some
  11. design decisions.)
  12.  
  13.  
  14.   DTA is a command-line utility for creating Autodesk Animator .FLI
  15.   and .FLC animation files from:
  16.  
  17.   o .TGA files
  18.   o .PNG files
  19.   o .JPG files (if the Independent JPEG Group's CJPEG and DJPEG
  20.     programs are present for DTA to shell to)
  21.   o .IMG files (created by the Vivid/Bob ray-tracer)
  22.   o .PCX files.
  23.   o some .TIF files
  24.   o .DIB or .BMP files
  25.   o USGS .DEM, .BIL, and .30S  elevation files.  (*NOT* Vistapro
  26.     DEM files which use a proprietary compression scheme)
  27.   o Other .FLI or .FLC files.
  28.   o VistaPro .VAN animation files
  29.   o Presidio .ANI animation files
  30.   o RAW animation files produced by Stefan Eckart's
  31.     DMPEG program.
  32.  
  33.   DTA does not support Compuserve's GIF format anymore because
  34.   of Unisys's new licensing plan for LZW compression.  (See
  35.   WHATSNEW.DTA for more of my whining about Unisys.)
  36.  
  37.   DTA can also perform a wide range of post-processing functions
  38.   on image files including:
  39.  
  40.   o Create a single optimal 256-color palette from a series of
  41.     truecolor pictures, and then creating an flic (FLI or FLC)
  42.     animation file out of them.
  43.   o Read in a palette file in either .COL or .MAP format
  44.     and animating a bunch of pictures using that palette.
  45.   o Append new frames to existing flic, using the palette from
  46.     that flic file.
  47.   o Build (or append to) a hicolor (16384- or 32768-color)
  48.     FLH file, or truecolor (16777216-color) FLT file.
  49.   o Create a palette as a .MAP (PICLAB, FRACTINT) or .COL
  50.     (Autodesk Animator) palette file.
  51.   o Convert pictures to a bunch of different still image formats.
  52.   o Arbitrary rotation.
  53.   o Scaling.
  54.   o Tiling.
  55.   o Multi-layer compositing.
  56.   o Averaging images together for a variety of effects, including
  57.     fades, simulated motion blur, and red/blue 3D.
  58.   o Lots more.
  59.  
  60.  
  61. ======================================================================
  62. **** IF YOU ARE HAVING MEMORY PROBLEMS WITH DTA, READ THIS ****
  63.  
  64. Real mode vs. Protected mode:
  65.  
  66.   DTA used to come in two varieties: a real mode version and
  67.   a protected mode version.  From now on there's only a
  68.   protected mode version.  There's no more DTAX.EXE as there
  69.   was in versions prior to release 2.0.
  70.  
  71.   DTA will let you access extended memory (either raw or configured
  72.   as XMS with HIMEM.SYS or QEMM386.SYS or whatever).
  73.   It requires at least 1 or 2 MB of RAM to run at all.
  74.  
  75.   Don't delete the files DPMI16BI.OVL, RTM.EXE, and DPMIINST.EXE.
  76.   These make up the protected mode drivers for Borland Pascal 7.0
  77.   (the compiler used to build DTA).  DTA won't run without them.
  78.   If you have versions of DPMI16BI.OVL and RTM.EXE that were
  79.   provided with other Borland products (Borland C++, Paradox)
  80.   they may conflict and prevent DTA from running.  You can prevent
  81.   this by changing your DOS path so that the directory containing
  82.   the ones provided with DTA comes before the directory that
  83.   contains the other ones.
  84.  
  85.  
  86. ======================================================================
  87. Operating under Windows 3.1
  88.  
  89.   To run DTA in Windows, you should use a DOS box.  You'll probably
  90.   need to edit the DOSPRMPT.PIF file using Windows' PIFEDIT program
  91.   to get Windows to give DTA enough memory to operate properly.  By
  92.   default, Windows only provides 1024K of XMS to a DOS window.
  93.   That's enough for DTA to execute, but not enough for DTA to
  94.   actually get anything accomplished.
  95.   Change the XMS memory KB limit to a nice high number like 8000
  96.   to give DTA some room to breathe.
  97.  
  98.  
  99. ======================================================================
  100. Operating under OS/2
  101.  
  102.   To run DTA in OS/2, you should use the OS/2 "DOS Full Screen"
  103.   icon.  You'll probably need to use the Settings dialog for this
  104.   icon to give DTA enough memory to operate properly.   Set the
  105.   XMS_MEMORY_LIMIT value to a nice high number like 8000.
  106.  
  107.  
  108. ======================================================================
  109. Operating under Windows 95
  110.  
  111.   To run DTA in Windows 95 you should use the MSDOS Prompt Icon
  112.   on the taskbar.  If you have "Out of memory" problems with DTA,
  113.   you might have to edit this icon's Properties.  On the Memory tab,
  114.   put a nice high number (like 8000) in the "MSDOS protected mode
  115.   (DPMI) memory" box.
  116.  
  117.     When run from the MSDOS Prompt window, DTA does support Windows
  118.   95 long filenames for input files, like so:
  119.      dta alongfilename.tga
  120.   or
  121.      dta "a long file name.tga"
  122.   or
  123.      dta longfilenames*.tga
  124.   You must use quotes if there are spaces imbedded in the filename.
  125.   Long filenames will *not* work in output filenames.  If you
  126.   specify /ft /olonglongfilename.tga, DTA will create a file called
  127.   "LONGLONG.TGA".  If you use a long input filename and let DTA
  128.   come up with its own output filename based on the input filename,
  129.   like this this:
  130.      dta LongFilename.Tga /fpng
  131.   then DTA will use the short equivalent of the input filename
  132.   when creating the output filename.  It will be something like
  133.   "LONGFI~1.PNG", not "LongFilename.Png".
  134.  
  135.     Note: Long filenames only work if you're running in a DOS window.
  136.   If you reboot in MSDOS mode, yer outta luck.
  137.  
  138.  
  139. ======================================================================
  140. The Rules:
  141.  
  142.   Feel free to re-upload this program to other bulletin board
  143.   systems, FTP sites, etc., in its *original, unmodified* form.
  144.   You may not repackage it with other programs.  You may not
  145.   repackage it with your own tutorial.  I feel like an idiot
  146.   having to make these demands, but I've been finding archives
  147.   on BBSs going by names like MORPHPAK.ZIP which are collections
  148.   of DTA, my other program DMorf, sometimes also Richard Godoeken's
  149.   program RMORPH, plus Trilobyte's PLAY.  That's not kosher.  I and
  150.   those other folks distributed our programs the way we did for
  151.   reasons.
  152.     Do not include this program on a disk along with any magazine,
  153.   book, hardware product, or other software product without my
  154.   permission.
  155.  
  156.     I claim no rights over any animations or pictures that you
  157.   create using DTA.
  158.  
  159.  
  160. ======================================================================
  161. Money matters:
  162.  
  163.   DTA is a shareware program.  If you think this program is worth
  164.   it, send some money or some computer hardware or something to:
  165.  
  166.     David K. Mason
  167.     P.O. Box 181015
  168.     Boston, MA 02118
  169.  
  170.   I think $35 is an appropriate amount, but feel free to send more
  171.   or less.
  172.  
  173.   If you use Compuserve, you may register DTA online using the
  174.   SWREG service.  DTA's SWREG ID is #2801.
  175.  
  176.  
  177. ======================================================================
  178. Blatant shameless plugs:
  179.  
  180.  Other shareware programs:
  181.  
  182.    o Dave's Morphing program (DMorf), the first shareware morphing
  183.      program for the PC.
  184.  
  185.    o Dave's Flic Viewer (DFV), an animation player that can
  186.      handle DTA's FLH and FLT files in addition to conventional
  187.      FLI and FLC files.  (This program is also provided as part
  188.      of the DTA package.)
  189.  
  190.    o Dave's Self-Viewing Flic Builder (BUILDSV), which
  191.      converts flics into executable programs by appending a
  192.      copy of the flic to a special version of DFV.
  193.      (This program is also provided as part of the DTA package.)
  194.  
  195. ----------------------------------------------------------------------
  196.  
  197.   For more information on using DTA and related programs,
  198.   see my books:
  199.  
  200.     "Making Movies on Your PC" (by David K. Mason and Alexander
  201.   Enzmann, Waite Group Press, $34.95 USA, ISBN 1-878739-41-7)
  202.   covers the creation of 3D animation sequences using Polyray
  203.   and DTA.  The DTA reference info is up to date through
  204.   release 1.8g.
  205.  
  206.     "Morphing on Your PC" (by David K. Mason, Waite Group Press,
  207.   $29.95 USA, ISBN 1-878739-53-0) covers building animated
  208.   morph sequences with DMorf and DTA.  The DTA reference info
  209.   is up to date through release 2.0, and covers some important
  210.   topics (like image composition) in greater detail than they're
  211.   covered in this document.
  212.  
  213.  
  214. ======================================================================
  215. Syntax:
  216.  
  217.  Syntax: DTA (filenames) (options)
  218.  
  219.  
  220. ======================================================================
  221. Input Formats:
  222.  
  223.   .TGA        Targa 8-,16-,24-,32-bit compressed/uncompressed.
  224.   .PCX        PC Paintbrush 256-color or 24-bit PCX images.
  225.   .DIB/.BMP   Microsoft Windows device-independent bitmap files.
  226.   .IMG        Vivid raytracer 24-bit RLE output.
  227.   .FLI and
  228.   .FLC        Autodesk Animator/Animator Pro animation files.
  229.   .VAN        VRLI VistaPro 256-color animation files.
  230.   .ANI        Presidio PC Animate Plus animation files.
  231.   .RLE        MindImage 2 SIRDS run-length encoded depth
  232.               files.
  233.   .DEM        USGS elevation map files.  (Not the Vistapro type)
  234.   .30S        Another elevation map format.
  235.   .BIL        Another elevation map format.
  236.  
  237.   .LZH        LHArc compressed archive containing files in the above
  238.               picture formats.
  239.   .ZIP        PKZIP compressed archive containing files in the above
  240.               picture formats.
  241.  
  242.   @script     Process all files listed in a text file called
  243.               "script.SCR".
  244.  
  245.  To specify a particular picture in an archive:
  246.    "ARCHIVE.ZIP:PICTURE.TGA".
  247.  To specify particular frames in an animation:
  248.    "ANIM.FLI:first[,last]".
  249.  
  250.  
  251. ======================================================================
  252. Switches:
  253.  
  254.  (Filename options)
  255.  
  256.    /O(name)      Specify output filename
  257.    /FO[#[,#]]    Always save to the original filename
  258.  
  259.  
  260.  (Output format options)
  261.  
  262.    By default, DTA will create a flic (.FLI/.FLC/.FLH/.FLT) animation
  263.    file.  Which type depends on the resolution and color depth that
  264.    you select.  320x200 256-color flic will be saved in .FLI format.
  265.    For any other resolution, in 256-color, DTA will build a .FLC
  266.    file.  15- and 16-bit color depth will cause DTA to build a
  267.    .FLH file, and 24-bit color depth will result in a .FLT file.
  268.  
  269.    Specify a different format with one of these switches:
  270.  
  271.    /FT   (Truevision Targa, .TGA)
  272.    /FB   (Windows Bitmap, .BMP)
  273.    /FM   (.MAP palette)
  274.    /FR   (MindImage, .RLE)
  275.    /FP   (ZSoft, .PCX)
  276.    /FD   (Windows Bitmap, .DIB)
  277.    /FC   (.COL palette)
  278.    /FI   (Tagged Image Format, .TIF (grayscale, uncompressed only))
  279.    /FJ   (JPEG,.JPG)
  280.    /FV   (.VAN animation)
  281.    /FPNG (Portable Network Graphics, .PNG)
  282.  
  283.  (Output resolution options)
  284.  
  285.    By default, DTA will create output files with the same dimensions as
  286.    as the input pictures.  When creating an animation, it will use the
  287.    dimensions of the first input picture.
  288.  
  289.    This is sometimes undesirable, as when you''ve got multiple pictures
  290.    of different sizes, or when you''re compositing pictures.
  291.  
  292.    So, you can override this with one of these switches:
  293.  
  294.    /R#    specify output resolution:
  295.              (1)  320x200
  296.              (2)  320x240
  297.              (3)  320x400
  298.              (4)  320x480
  299.              (5)  360x480
  300.              (6)  640x480
  301.              (7)  640x400
  302.              (8)  800x600
  303.              (10) 1024x768
  304.              (12) 1280x1024
  305.  
  306.    /R#,#  specify resolution exactly
  307.  
  308.  (Misc. output options)
  309.  
  310.    /B##   bits per pixel.  Legal values and *defaults*:
  311.             TGA: 1 8 15 *24* 32
  312.             PNG: 8 16(grayscale) *24* 32
  313.             flics: 1/*8*/15/16/24
  314.             PCX: *8* 24
  315.             BMP/DIB: 8 *24*
  316.             all others: 8
  317.  
  318.  (Flic output options)
  319.  
  320.     /FLAP  append new frames to existing flic
  321.     /FLC   build .FLC even when the size is 320x200 (8-bit only)
  322.     /FLX   build a Tempra .FLX file instead of default .FLH (16-bit
  323.            only)
  324.     /P     ping-pong
  325.     /Snnn  specify display speed of animation; default=0
  326.     /TO#   (flic tolerance) causes DTA to ignore pixel differences
  327.            between frames when the distance in color-space is less
  328.            than or equal to a value that you supply.
  329.     /TX#   Include a complete, no-tolerance frame once every
  330.            # frames.  (use only in conjunction with /TO)
  331.            (/TO and /TX work only with FLT and FLH files)
  332.     /EO    "even-odd" compression
  333.     /BA    use rle compression instead of delta if it makes
  334.            a frame smaller
  335.  
  336.  (.TGA output options)
  337.  
  338.     /NC    don''t compress .TGA files
  339.     /BU    save .TGA files bottom-up instead of top-down
  340.  
  341.  (.PNG output options)
  342.     /PB    use best filter for each picture.  This is very
  343.            slow, because DTA must save each picture 5 times
  344.            to see which filter creates a smaller file than
  345.            the rest
  346.  
  347.  (Palette options for colormapped output)
  348.  
  349.     /G           Use greyscale instead of a palette.
  350.                  This will be a 256-level grayscale in formats
  351.                  which really support grayscale images (like TGA,
  352.                  PNG, and TIF) or a 64-level grayscale for formats
  353.                  which allow it to be faked using a palette
  354.                  (like flic, PCX, etc.)
  355.     /G32         Use 32-level greyscale instead of a palette.
  356.                  (there's also a /G128, /G64, /G32, /G16, /G8,
  357.                  and /G4)
  358.                    /G represents a 256-level grayscale except when
  359.                  the output format is a 320x200 .FLI file, when it
  360.                  represents a 64-level grayscale.  That's because
  361.                  .FLI won't support higher than 64 shades.
  362.                  /G128 represents a 128-level grayscale, /G64 a
  363.                  64-level grayscale, etc.
  364.                    Most VGA and SVGA monitors can only display 64
  365.                  shades of gray except in 24-bit modes, so it's
  366.                  wasteful to use more than that if your picture will
  367.                  only be displayed on a monitor.  Some laptop VGA
  368.                  displays can only display 32 shades.
  369.                    If you're going to be printing your image or using
  370.                  it as a bump map or height field with a rendering
  371.                  program, then the more shades the better.
  372.     /332         Use 3/3/2 palette.
  373.     /Upalname    Use existing .MAP or .COL file for palette.
  374.     /M#          Set maximum colors.
  375.     /NM          Do NOT remap colormapped input.
  376.     /PO          Force single optimal palette generation even when
  377.                  creating single-image files.
  378.     /C#          Scan only one frame per # for palette.
  379.     /RO          Generate palette using octree color reduction
  380.                  instead of median cut
  381.  
  382.  (Frame averaging options)
  383.  
  384.     /A[#|A]  Average <number> TGAs per output frame (A=All)
  385.     /T[#|A]  Trail   <number> TGAs per output frame (A=All)
  386.     /X[num]  eXpand <number>. Create and insert <number> averaged.
  387.              frames between each pair of regular frames
  388.     /XL      apply expansion after the final frame
  389.     /WF      weight of first frame (default=1)
  390.     /WI      weight increment (default=0)
  391.     /FA      use fast averaging for /X, /T, and /A.  It uses less
  392.              memory.
  393.  
  394.  (Fades, etc.)');
  395.     /FADE#         Fade between two images for # frames
  396.     /REP#          Repeat a frame # times
  397.  
  398.  (Dithering options)
  399.     /DF          dither with Floyd-Steinberg filter
  400.     /DS          dither with Sierra Lite filter
  401.     /DO[#]       Ordered dither; digit represents dither strength
  402.     /DR[#]       Random noise dither (uses the same random-number
  403.                  seed at the beginning of each frame to help
  404.                  delta compression)
  405.     /DN[#]       Alternate random noise dither (uses a different
  406.                  random-number seed at the beginning of each
  407.                  frame, and a different seed for each color channel
  408.                  ... this dither compresses very badly but looks
  409.                  more "noisy" in an animation)
  410.  
  411.  (Composition options)
  412.  
  413.     /L             Separates image layers.  Picture files specified
  414.                    in later layers get overlayed on top of previous
  415.                    layers.  If the overlayed pictures contain
  416.                    transparency information (32-bit TGA files only),
  417.                    then the pictures underneath will show through.
  418.     /CK#,#,#       Chroma-key, to make all occurrences of a color
  419.                    transparent for compositing.  The three numbers
  420.                    represent the red,green, and blue components
  421.                    of the key color
  422.     /CI#,#,#       inverse chroma-key... make all colors other than
  423.                    the one specified transparent
  424.     /CA            additive composition.  Tells DTA to add colors
  425.                    when compositing a layer instead of overlaying
  426.                    them.  This is useful for glare effects, and
  427.                    probably also for spooky ghost-like effects.
  428.                    Sometimes this effect makes the foreground
  429.                    image look too bright... this might be a good
  430.                    occasion to adjust the brightness of the
  431.                    image using the /GA (gamma-correction) feature
  432.     /CT#           Chroma-key tolerance.  Specifies how close to the
  433.                    key color a pixel has to be to make it transparent.
  434.     /CC#,#,#,#     chroma-key color... specify an RGBa value to replace
  435.                    chroma-keyed pixels with (default=0,0,0,0)
  436.     /ALPHA, /RED,  make a grayscale image from a picture''s alpha channel,
  437.     /GREEN, /BLUE  or from one of the color channels.
  438.  
  439.  (Tiling)
  440.     /TILE#         Tile images # by #
  441.     /TILEX#        Tile images horizontally, # per picture
  442.     /TILEY#        tile images vertically, # per picture
  443.  
  444.  (Geometrical transformation options)
  445.     /CL#,#[,#,#]   Clip the input picture.  The first two numbers
  446.                    specify the top-left, and the other two numbers
  447.                    control the width and depth.
  448.     /CLP#,#[,#,#]  clip from top-left (after scaling)
  449.     /LOC#,#[,#]    specify where to place image (default is 0,0)
  450.                    The final number specifies time
  451.     /LT            Make /LOC base vertical coords from the top edge
  452.                    instead of the center.
  453.     /LB            Make /LOC base vertical coords from the bottom edge.
  454.     /LL            Make /LOC base horizontal coords from the left edge
  455.                    instead of the center
  456.     /LR            Make /LOC base horizontal coords from the right edge
  457.     /ROT#[,#]      rotation... first number represents angle, second
  458.                    is for time
  459.     /SC[#,#[,#]]   rescale pictures to screen res. or specified size
  460.     /SCF[#,#[,#]]  fast, but dumb, rescale
  461.  
  462.  (Other options that I don''t know how to classify)
  463.  
  464.     /K#            Use only one frame per # picture files.  Skip the
  465.                    rest.
  466.     /I[#]          process a total of # picture files
  467.     /GA#           Adjust brightness using gamma function.
  468.                    Try specifying a number
  469.                    between 1.0 and 2.0 to brighten, between 0.5 and
  470.                    1.0 to darken.
  471.     /INV[R,G,B,A]  invert colors or individual color channel
  472.     /FLD           "Fieldify" images
  473.     /FLDE          "Fieldify" images, swap even/odd
  474.  
  475.  
  476. ======================================================================
  477. Scripts:
  478.  
  479.   As I mentioned earlier, you tell DTA to process all the files
  480.   listed in a text file by specifying the name of the text file
  481.   preceded by a "@".
  482.     A script file can contain as many file specifications
  483.   as you want.  It can also contain any of the above-mentioned
  484.   switches.  Each must be on a line of its own.
  485.     Here's an example script called test.scr:
  486.  
  487.      back.tga
  488.      /l
  489.      *.tga
  490.      /a2
  491.      /sc640,480
  492.      /l
  493.      signat.pcx
  494.      /lr
  495.      /lb
  496.      /fo2
  497.  
  498.     Typing "dta @test" in this case would cause DTA to perform
  499.   exactly the same as if you instead typed:
  500.  
  501.      dta back.pcx /l *.tga /a2 /sc640,480 /l signat.pcx /lr /lb /fo2
  502.  
  503.     Scripts can come in handy if
  504.  
  505.     (a) your command is just getting too darn long and
  506.   complicated to fit on a DOS command line.  A script can
  507.   be as long as you want.
  508.     (b) you have to use the same command over and over
  509.   again.  Why remember all that stuff or use a crib sheet
  510.   when you can just put it all in a script just once
  511.   and then use it over and over.
  512.  
  513.     You can also use a script in addition to other filenames
  514.   and switches:
  515.  
  516.     Say you had a script file called whirl.scr that looked like
  517.   this:
  518.  
  519.      /l
  520.      logo.pcx
  521.      /rot0,0
  522.      /rot360,100
  523.      /ch0,0,0
  524.      /loc400,350
  525.  
  526.     then instead of typing
  527.  
  528.      dta x*.tga /l logo.pcx /rot0,0 /rot360,100 /ch0,0,0 /loc400,350
  529.  
  530.     you could just type:
  531.  
  532.      dta x*.tga @whirl
  533.  
  534.  
  535. ======================================================================
  536. Revision History:
  537.  
  538.   (see WHATSNEW.DTA)
  539.  
  540.  
  541. ======================================================================
  542. Averaging/Trailing/Expansion modes (/A /T /X switches) examples:
  543.  
  544.   Averaging 5 input pictures with "/A2" option:
  545.  
  546.     Average:    To produce:
  547.  
  548.     file 1      frame 1
  549.     file 2
  550.  
  551.     file 3      frame 2
  552.     file 4
  553.  
  554.     file 5      frame 3
  555.     file 1
  556.  
  557.   Trailing 4 input pictures with "/T2" option:
  558.  
  559.     Average:    To produce:
  560.  
  561.     file 1      frame 1
  562.     file 2
  563.  
  564.     file 2      frame 2
  565.     file 3
  566.  
  567.     file 3      frame 3
  568.     file 4
  569.  
  570.     file 4     frame 4
  571.     file 1
  572.  
  573.   Trailing 5 input pictures with "/T3" option:
  574.  
  575.     Average:    To produce:
  576.  
  577.     file 1      frame 1
  578.     file 2
  579.     file 3
  580.  
  581.     file 2      frame 2
  582.     file 3
  583.     file 4
  584.  
  585.     file 3      frame 3
  586.     file 4
  587.     file 1
  588.  
  589.     file 4      frame 4
  590.     file 5
  591.     file 1
  592.  
  593.     file 5      frame 5
  594.     file 1
  595.     file 2
  596.  
  597.   Expanding 2 input pictures with "/X1" option:
  598.  
  599.     frame 1 =  (100% of FILE 1  ) + (  0% of FILE 2  )
  600.     frame 2 =  ( 50% of FILE 1  ) + ( 50% of FILE 2  )
  601.     frame 3 =  (  0% of FILE 1  ) + (100% of FILE 2  )
  602.  
  603.   Expanding 2 input pictures with /X2" option:
  604.  
  605.     frame 1 =  (100% of FILE 1  ) + (  0% of FILE 2  )
  606.     frame 2 =  ( 66% of FILE 1  ) + ( 33% of FILE 2  )
  607.     frame 3 =  ( 33% of FILE 1  ) + ( 66% of FILE 2  )
  608.     frame 4 =  (  0% of FILE 1  ) + (100% of FILE 2  )
  609.  
  610.  
  611. ======================================================================
  612. Tiling
  613.  
  614. Let's say you have a bunch of images and you want to combine them
  615. into a smaller number of images without any overlaying.  The /tile,
  616. /tilex, and /tiley switches will let you do that.
  617.  
  618. If you type this:
  619.  
  620.   dta *.tga /tile3 /ft /otiled /r640,480
  621.  
  622. Each output image will consist of 9 input images, tiled 3 by 3.
  623. Each image will be rescaled such that the tiled result fits in
  624. 640 by 480 pixels.
  625.  
  626. If you do not specify an output resolution then one will be
  627. selected for you and it might not be what you want: DTA will
  628. figure out the dimensions of the first input image, and multiply
  629. that by 3 in both directions.  So *don't* forget to specify
  630. an output resolution.
  631.  
  632.   dta *.tga /tilex2
  633.  
  634. will cause DTA to tile two images horizontally to create each
  635. output image.
  636.  
  637.   dta *.tga /tiley10
  638.  
  639. will cause DTA to tile ten images vertically to create each
  640. output image.
  641.  
  642.   dta *.tga /tilex2 /tiley10
  643.  
  644. will cause DTa to tile two images horizontally and ten images
  645. vertically (combining twenty input images) to create each
  646. output image.
  647.  
  648.  
  649. ======================================================================
  650. Miscellaneous examples:
  651.  
  652. (Note: some of these examples, especially the ones near the
  653. very end, are ridiculous... you'd never actually have a use for
  654. exactly those combinations of switches.  They're there to
  655. give you an idea of what weirdness you can achieve by
  656. mixing and matching DTA's assorted abilities.)
  657.  
  658. (Note 2: This section could use some more examples... if
  659. you've got a favorite combination, let me know and I'll add
  660. it to this doc.)
  661.  
  662. ----------------------------------------------------------------------
  663. DTA ROCKET*.TGA
  664.  
  665. Create an 8-bit (256-color) flic file (.FLI or .FLC) from a bunch
  666. of .TGA files.
  667.  
  668. ----------------------------------------------------------------------
  669. DTA ROCKET*.TGA /B16
  670.  
  671. Create an 16-bit flic file (.FLH) from a bunch of .TGA files.
  672.  
  673. ----------------------------------------------------------------------
  674. DTA ROCKET*.TGA /B24
  675.  
  676. Create an 24-bit flic file (.FLT) from a bunch of .TGA files.
  677.  
  678. ----------------------------------------------------------------------
  679. DTA ROCKET*.TGA /FC /OROCKET
  680.  
  681. Make a palette for all .TGA files starting with "ROCKET".
  682. Output the palette to an Animator palette file called "ROCKET.COL".
  683.  
  684. ----------------------------------------------------------------------
  685. DTA SKY.PCX /L BEFORE.TGA MORF*.TGA AFTER.TGA
  686.  
  687. Build a multilayer flic.  SKY.PCX gets put in the background, and
  688. the pictures FIRST.TGA, a bunch of TGAs beginning with the string
  689. MORF, and LAST.TGA get superimposed over it.  SKY.PCX shows through
  690. any parts of the other pictures which are transparent.
  691. (32-bit TGA files can contain a transparency value for each
  692. pixel called an "alpha channel".)
  693.  
  694. This example assumes that the pictures BEFORE.TGA and AFTER.TGA
  695. had transparency added to them with my other program, DMorf
  696. (Rel. 1.1 or higher), and that the MORF*.TGA files are morphed
  697. pictures built with DMorf.
  698.  
  699. ----------------------------------------------------------------------
  700. DTA ROOM.TGA /L GUY*.TGA /L WINDOW.TGA
  701.  
  702. Another multilayer flic.  The first layer is an image of a room
  703. in a house.  The second layer contains a series of a man walking
  704. across the screen.  Let's assume that the background of these
  705. images has been matted out with an alpha channel so that the
  706. walking dude is all that shows.  (This could be accomplished
  707. by recording the person walking in front of a blue or green
  708. screen and then using chromakey to erase the screen.)
  709. The third image is an outside view of a window.  The window frame
  710. and the building wall around it are opaque, but the window pane
  711. itself is transparent.
  712.  
  713. The result is an animation of a person inside the room walking
  714. past the window.
  715.  
  716. ----------------------------------------------------------------------
  717. DTA ROOM.TGA /L GUY*.TGA /CA /L WINDOW.TGA
  718.  
  719. Let's turn the last example into a scene from a horror story.
  720. By using additive composition, the guy walking past the
  721. window looks more like a ghost.  The background shows through
  722. his body and he acquires a kind of glow.
  723.  
  724. ----------------------------------------------------------------------
  725. DTA PIC1 PIC2 PIC3 /FM /OXYZ
  726.  
  727. Make a palette for .TGA files "PIC1.TGA", "PIC2.TGA", and "PIC3.TGA"
  728. Output the palette to a PICLAB palette file called "XYZ.MAP".
  729.  
  730. ----------------------------------------------------------------------
  731. DTA ROCKET* /OROCKET /DF
  732.  
  733. Make input from all .TGA files beginning with "ROCKET".
  734. Output to an animation file called "ROCKET.FLI".
  735. Dither the frames with Floyd-Steinberg error-diffusion.
  736.  
  737. ----------------------------------------------------------------------
  738. DTA ROCKET* /G /DO2 /P
  739.  
  740. Make input from all .TGA files beginning with "ROCKET".
  741. Map colors to grayscale.
  742. Dither, using ordered dither strength 2.
  743. Ping-pong it.
  744. Output to an animation with the default name of "ANIM.FLI"
  745.  
  746. ----------------------------------------------------------------------
  747. DTA ROCKET
  748.  
  749. Make input from ROCKET.TGA.
  750. Output to an animation with the default name of "ANIM.FLI".
  751.  
  752. ----------------------------------------------------------------------
  753. DTA @WING2.LST /S10 /OWING2.FLI
  754.  
  755. Make input from files listed in a text file called "WING2.LST".
  756. Set playback speed to "10".
  757. Output to an animation with the name of "WING2.FLI".
  758.  
  759. ----------------------------------------------------------------------
  760. DTA BBB*.TGA AAA*.TGA /UPAL1.COL /UPAL2.MAP /OFRED
  761.  
  762. Make input from all .TGA files whose name begins with "BBB", and "AAA".
  763. NOTE:
  764.     The "BBB" files will appear in the animation before the "AAA" files.
  765.     The "BBB" files will be sorted alphabetically, and so will the
  766.     "AAA" files, but separately.
  767. Read in an Animator palette file called "PAL1.COL", and merge it with
  768.     a Piclab palette file called "PAL2.MAP".
  769.     Use this combined palette for the animation.
  770. Output to an animation with the name of "FRED.FLI".
  771.  
  772. ----------------------------------------------------------------------
  773. DTA *.TGA /FP
  774.  
  775. Make .PCXs from all .TGAs in the current directory.
  776.  
  777. ----------------------------------------------------------------------
  778. DTA SOMBRERO /FP /DR2 /G
  779.  
  780. Make a dithered grayscale .PCX from a file called SOMBRERO.TGA.
  781.  
  782. ----------------------------------------------------------------------
  783. DTA /CHR LEFT*.TGA /GA0.8 /CHB RIGHT*.TGA
  784.  
  785. Make a red/blue 3D .FLI file.
  786. Use greyscale versions of the .TGA files beginning with "LEFT" as
  787. the red component and of the ones beginning with "RGHT" as the blue
  788. component.
  789. NOTE: For this to work right, there must be an equal number of
  790.    "LEFT" and "RGHT" .TGAs.
  791. (the /ga is to adjust the brightness of the red component
  792. so it doesn't drown out the blues.  Some experimentation
  793. may be necessary to get the balance just right... if
  794. somebody comes up with a better brightness combination,
  795. let me know and I'll put it right here in the doc.)
  796. Output to an animation with the default filename of "ANIM.FLI"
  797.  
  798. ----------------------------------------------------------------------
  799. DTA RIGHT*.TGA /CHR LEFT*.TGA /RED
  800.  
  801. Another way to make a red/blue 3D .FLI file.  Use the red portion
  802. of the left pictures for the red component of the output, use the
  803. green and blue portions of the right pictures unmodified.   The
  804. resulting images retain much of their original color even when
  805. viewed through funny glasses.
  806.  
  807. ----------------------------------------------------------------------
  808. DTA XXX*.TGA /L YYY*.TGA /CHA ZZZ*.TGA
  809.  
  810. This is a fun one...  Create an animation with three sets
  811. of pictures.  The ones called XXX*.TGA are the background,
  812. and the YYY*.TGA pictures are the foreground.  But,
  813. the ZZZ*.TGA pictures are used for the alpha channel of
  814. the foreground, dictating which parts of the YYY pictures
  815. will be transparent and how much (dark parts of ZZZ will
  816. make YYY very transparent, while bright parts will be less
  817. so.
  818.  
  819. ----------------------------------------------------------------------
  820. DTA XXX* /FTYY /AA
  821.  
  822. Make input from .TGAs beginning with "XXX".
  823. Average all files.
  824. Output to a new Targa file called "YY.TGA".
  825.  
  826. ----------------------------------------------------------------------
  827. DTA XXX*.TGA /T3 /DO3 /OZZZ
  828.  
  829. Make input from all .TGA files beginning with "XXX"
  830. Trail 3 frames.
  831. Use ordered dithering, strength 3.
  832. Output an animation called "ZZZ.FLI"
  833.  
  834. ----------------------------------------------------------------------
  835. DTA XXX*.TGA /X3
  836.  
  837. Make input from all .TGA files beginning with "XXX"
  838. Expand 3.  Assuming 5 .TGA input files, this would create a 15 frame
  839. animation.
  840. Output an animation called "ANIM.FLI"
  841.  
  842. ----------------------------------------------------------------------
  843. DTA *.PCX
  844.  
  845. Creates a file called ANIM.FLI or ANIM.FLC from all .PCX files in the
  846. current directory.  (The extension depends on the resolution of the
  847. first picture.  If it's 320 by 200, then DTA will create a .FLI
  848. file.  Otherwise, it'll create a .FLC.
  849.  
  850. ----------------------------------------------------------------------
  851. DTA *.TGA /K2 /C2
  852.  
  853. Assuming 60 .TGA files, create a flic containing only 30 frames.
  854. Generate the palette from only 15 frames.
  855.  
  856. ----------------------------------------------------------------------
  857. DTA *.PCX /R320,200 /SC
  858.  
  859. Create a flic from a bunch of PCX files, set the screen size
  860. to 320 by 200, and rescale all the images to the screen size.
  861.  
  862. ----------------------------------------------------------------------
  863. DTA *.TGA /R6 /SC320,240
  864.  
  865. Create a 640x480 FLC file from a bunch of TGA files.  Rescale each
  866. picture so that the width is depth is 240, but leave the width alone.
  867. This one is useful when you want to turn a bunch of 320x200
  868. pictures into a 640x480 flic... because 320x200 screens use a
  869. different aspect ratio than 640x480.  320x200 pictures look a
  870. bit squat when you display them in 640x480 mode, but 320x240 looks
  871. correct.
  872.  
  873. ----------------------------------------------------------------------
  874. DTA FLIC1.FLI FLIC2.FLI /OFLIC3
  875.  
  876. Create a new flic by appending two existing flics.  Unlike my old
  877. FLAP program, DTA will create a new palette.
  878.  
  879. ----------------------------------------------------------------------
  880. DTA FLIC.FLI /FP /NM
  881.  
  882. Create PCX files from the frames in FLIC.FLI.  The /NM tells DTA
  883. *not* to generate an optimized palette.  That would be a waste of
  884. time, since a FLIC file usually contains an optimized palette.
  885.  
  886. ----------------------------------------------------------------------
  887. DTA FLIC.FLI /SC120,100 /ROT90 /ONEWFLIC /R1 /NM
  888.  
  889. Read an existing flic, scale each of the frames to a 100x100
  890. square, rotate the result 90 degrees to the right, and
  891. create a new flic.  (The /R1 tells DTA to make a 320x200
  892. .FLI file instead of a 100x120 .FLC file.  The little 100x120
  893. square gets placed in the middle of the screen.
  894.  
  895. ----------------------------------------------------------------------
  896. DTA FLIC.FLI /SC100,100 /ROT0,0 /ROT360,100 /ONEWFLIC /R1
  897.  
  898. This one is much like the last example, but a bit funkier.
  899. The first frame (0%) will be rotated 0 degrees (not at all).
  900. The last frame (100%) will be rotated 360 degrees (a complete
  901. rotation).  The frames in between will be rotated in imcrements
  902. between 0 and 360 degrees. (If you had 362 frames in the
  903. animation, then the second frame would be rotated 1 degree,
  904. the second 2 degrees, etc.)
  905.   Note we did *not* use the /NM switch to turn off palette
  906. optimization.  Scaling and rotation *require* that the palette
  907. be remapped because the processes create new colors.
  908. On the other hand, fast scaling (/SCF) and 90-degree
  909. rotations do not require an optimized palette.
  910.  
  911. ----------------------------------------------------------------------
  912. DTA FLIC.FLI /SC100,100 /ROT0,0 /ROT180,66.666 /ROT360,100 /ONF /R1
  913.  
  914. Not quite the same as the last example.  Instead of rotating
  915. the frames at a constant rate the rotation starts slowly, until
  916. at two-thirds (66.666%) of the way through the images have rotated
  917. 180 degrees.  The rotation speeds up so that by the time it hits
  918. finishes (100%), it's completed a full rotation.
  919.  
  920. ----------------------------------------------------------------------
  921. DTA BACKUP.ZIP:FLIC.FLI:20 /CL110,120,90,80 /FT
  922.  
  923. Read frame 20 of a flic that's stored in a ZIP file.
  924. Clip a 90x80-pixel square from location 100,120 of the image
  925. and save it as a TGA file.
  926.  
  927. ----------------------------------------------------------------------
  928. DTA *.TGA /TO15
  929.  
  930. Create a flic from a bunch of .TGA files.  When comparing
  931. pictures to produce delta frames in a flic, ignore color
  932. differences that are less than 15 units in color-space.
  933. The resulting flic won't look as good, but it will be smaller
  934. and will play more quickly.  This trick works better on
  935. digitized video than it does with computer-generated
  936. images.
  937.  
  938. ----------------------------------------------------------------------
  939. DTA *.TGA /TO15 /TX5
  940.  
  941. This works much like the last example, but every fifth frame
  942. in the resulting flic will use a tolerance of 0.
  943.  
  944.  
  945. ======================================================================
  946. Credits:
  947.  
  948.   To create palettes and select colors from palettes, this
  949.   program uses the median cut quantization, using code from
  950.   Lutz Kretzschmar (of SoftTronics).
  951.  
  952.   DTA's alternate color quantization method, called octree
  953.   quantization and called with the /RO command-line switch,
  954.   I found in an article called "A Simple Method for Color Quantization:
  955.   Octree Quantization," by Michael Gervautz and Werner Purgathofer,
  956.   which can be found in a book called "Graphics Gems," edited by
  957.   Andrew S. Glassner.  I recommend this book highly.
  958.  
  959.   I got my first intro to the .FLI format was a document included
  960.   with Jim Kent's FLILIB.  Autodesk has sincce updated this doc
  961.   to create a file called ANIFILES.DOC which includes .FLC info.
  962.   Even more thanks to Jim Kent for the FLC info he gave me online
  963.   at BIX.
  964.  
  965.   Thanks to Borland International and TurboPower Software for
  966.   creating some great programming tools.
  967.  
  968.   Thanks to Dan Farmer, Alexander Enzmann, Jeff Bowermaster,
  969.   Lutz Kretzschar, Tim Wegner, John Jordan, and many others
  970.   for their excellent suggestions and other contributions.
  971.  
  972.   Thanks to Dan Farmer for sprucing up this documentation
  973.   file a couple versions back.
  974.  
  975.   Thanks to the Cafe Pamplona in Harvard Square for being such
  976.   a cool place to swill coffee and discuss ray-tracing and animation.
  977.  
  978. ======================================================================
  979. Disclaimer:
  980.  
  981.   If you use DTA, you do so at your own risk.  I won't be held
  982.   responsible if it screws anything up.  I don't think it will,
  983.   but stranger things have happened.  If you don't agree
  984.   to this, then don't use it.
  985.  
  986. ======================================================================
  987. Support:
  988.  
  989.   If you've got any requests/bug reports/suggestions, send a message
  990.   to:
  991.  
  992.     "76546,1321" on Compuserve.  From the Internet, that's
  993.     "76546.1321@compuserve.com".
  994.  
  995.   You'll probably get some kind of a response (maybe sooner, maybe
  996.   later)
  997.